package gui.components;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
/**
 * About dialog
 * @author Jie Zhao(288654)
 *
 */
public class AboutDialog extends JDialog {
	private final JLabel subject433652Label = new JLabel();
	private final JLabel projectDistributedWhiteboardLabel = new JLabel();
	private final JButton closeButton = new JButton();
	private final JLabel studentLabel = new JLabel();
	private final JLabel jieZhao288654Label = new JLabel();
	private final JLabel jokoParmiyanto300843Label = new JLabel();
	public AboutDialog() {
		super();
		try {
			jbInit();
		} catch (Throwable e) {
			e.printStackTrace();
		}
	}
	private void jbInit() throws Exception {
		getContentPane().setLayout(null);
		setAlwaysOnTop(true);
		setSize(267, 186);
		setTitle("About");
		
		getContentPane().add(subject433652Label);
		subject433652Label.setText("Subject: 433-652");
		subject433652Label.setBounds(10, 10, 161, 16);
		
		getContentPane().add(projectDistributedWhiteboardLabel);
		projectDistributedWhiteboardLabel.setText("Project: Distributed Whiteboard");
		projectDistributedWhiteboardLabel.setBounds(10, 32, 203, 16);
		
		getContentPane().add(closeButton);
		closeButton.addActionListener(new CloseButtonActionListener());
		closeButton.setText("Close");
		closeButton.setBounds(95, 120, 106, 26);
		
		getContentPane().add(studentLabel);
		studentLabel.setText("Students:");
		studentLabel.setBounds(10, 54, 66, 16);
		
		getContentPane().add(jieZhao288654Label);
		jieZhao288654Label.setText("Jie Zhao(288654)");
		jieZhao288654Label.setBounds(79, 54, 134, 16);
		
		getContentPane().add(jokoParmiyanto300843Label);
		jokoParmiyanto300843Label.setText("Joko Parmiyanto(300843)");
		jokoParmiyanto300843Label.setBounds(79, 81, 161, 16);
	}
	private class CloseButtonActionListener implements ActionListener {
		public void actionPerformed(ActionEvent e) {
			closeButton_actionPerformed(e);
		}
	}
	protected void closeButton_actionPerformed(ActionEvent e) {
		this.setVisible(false);
	}

}
